package game.players.states;

import game.players.SoccerPlayer;

import com.uqbar.vainilla.DeltaState;

public abstract class WithBallSweepingPlayer extends WithBall {
	
	private boolean isRight;

	public WithBallSweepingPlayer(SoccerPlayer player, boolean isRight) {
		super(player);
		
		this.setRight(isRight);
		if (this.isRight())
			this.setRightSprite();
		else
			this.setLeftSprite();
	}
	
	@Override
	public void update(DeltaState deltaState) {
		if (this.isRight())
			this.getSoccerBall().moveNormally(3, 0);
		else
			this.getSoccerBall().moveNormally(-3, 0);
	}
	
	protected abstract void setRightSprite();
	
	protected abstract void setLeftSprite();
	
	
	
	
	
	
	public void setRight(boolean isRight) {
		this.isRight = isRight;
	}

	@Override
	public boolean isRight() {
		return isRight;
	}

}
